package dev.bong.vo;

import dev.bong.pojo.entity.User;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;

/**
 * @author: bong~
 * @description: TODO
 * @date: 2024/4/11 20:54
 * @version: 1.0
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("实验员信息")
public class ExperimenterVo {


    @NotEmpty
    private String userAccount;
    private String userPassword;
    private String userName;
    private String professionalTitle;

    public static User toUser(ExperimenterVo vo){
        User user=new User();
        user.setUserAccount(vo.getUserAccount());
        user.setUserPassword(vo.getUserPassword());
        user.setUserName(vo.getUserName());
        user.setProfessionalTitle(vo.getProfessionalTitle());

        return user;
    }






}
